<%@ page language="java" contentType="text/html; charset=utf-8" import="java.sql.*" errorPage=""%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .title {
        font-size: 35px;
        margin-top: 50px;
        text-align: center;
    }
    .but {
        margin-top: 20px;
        text-align: center;
    }
    .answer {
        margin-left: 400px;
        font-size: 25px;
        color: blue;
        text-indent:2em;
    }
    
</style>
<body>
	<jsp:useBean id="LogBean" scope="session" class="Bean.dbConn"/>
    <div class="title">测试明细表</div>
    <%
    ResultSet rs = null;
    ResultSet rb = null;
    
    String myid = request.getParameter("myid");
    rs = LogBean.executeQuery("SELECT * FROM user where id =" + "'"+ myid +"'");
		rs.next();
    %>
    <table border="0" align="center">
        <tr>
            <td>学号:</td>
            <td><%=rs.getString("number")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td>姓名:</td>
            <td><%=rs.getString("name")%></td>
        </tr>
        <tr>
            <td>班级:</td>
            <td><%=rs.getString("class")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td>性别:</td>
            <td><%=rs.getString("sex")%></td>
        </tr>
        <tr>
            <td>年龄:</td>
            <td><%=rs.getString("bril")%>岁&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        </tr>
        </table>
        <%
        rb = LogBean.executeQuery("SELECT * FROM times where myid =" + "'"+ myid +"'");
        while(rb.next()) {
        out.print("<table border='0' align='center'>");
        out.print("<tr><td>测试量表:</td>");
				out.print("<td>" + rb.getString("testpe") + "</td>");
				out.print("<td>测试时间:</td>");
				out.print("<td>" + rb.getString("ti") + "</td></tr>");
				out.print("<tr><td>粗分:</td>");
				out.print("<td>" + rb.getString("num") + "</td>");
				out.print("<td>标准分:</td>");
				out.print("<td>" + rb.getString("avg1") + "</td></tr>");
				out.print("<tr><td>结果分析:</td></tr>");		
				out.print("</table>");
				out.print("<div class='answer'>" + rb.getString("dic") +"</div>");		
        }
        %>
    <div class="but">
        <a href="testlist.jsp" target="_blank">
            <button>返回列表</button>
        </a>
    </div>
    
</body>
</html>